// 登录
function login() {
    var name = document.getElementById('input-box').value
    if(name){
        localStorage.setItem('nickname', name)
        return true
    }
    else{
        return false
    }

}

onload = function() {
    if(localStorage.getItem('nickname')){
        location = 'chatroom'
    }
}
